//
//  FlutterFragment.swift
//  FNiOS
//
//  Created by mac on 2023/3/14.
//

import SwiftUI
import FlutterBridge
import UIKit


struct EmptyView: UIViewRepresentable {
    
    typealias UIViewType = EmptyViewUIView
    
    // make 方法返回初始视图
    func makeUIView(context: Context) -> EmptyViewUIView {
        return EmptyViewUIView()
    }
    
    // update 方法使我们能够将 UIView 和 SwiftUI 状态更新保持同步
    func updateUIView(_ uiView: EmptyViewUIView, context: Context) {
        
    }
    
}

class EmptyViewUIView: UIView {
    
    var name = "Flutter 碎片"	
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        print("初始化 EmptyViewUIView")
    }
    
    required init?(coder: NSCoder) {
        fatalError("请不要通过这种方式 初始化 FlutterFragmentView")
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        //
    }
}




//struct FlutterFragment_Previews: PreviewProvider {
//    static var previews: some View {
//        FlutterFragment()
//    }
//}
